﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using ZLWeb.WebApiEntityBase;

namespace ZLWeb.WebApiEntity.WechatCardModel
{
    public class Wxlog : QMessage
    {
        public override string MessageRouter
        {
            get { return "Wxlog"; }
        }

        /// <summary>
        ///  微信转账操作流水号
        /// </summary>
        public string tllsh { get; set; }

        /// <summary>
        ///  客户注册编码[cousercode 3位]+随机附加值LEFT（(通过newid()去除"-"生成)，17）[20位]
        /// </summary>
        public string tlfjz { get; set; }

        /// <summary>
        ///  本地业务生效时间(自然时间)
        /// </summary>
        public DateTime? tlsj { get; set; }

        /// <summary>
        ///  发生地点id(分支机构)
        /// </summary>
        public int tlddid { get; set; }

        /// <summary>
        ///  企业号账号（appid）
        /// </summary>
        public string tlqyh { get; set; }

        /// <summary>
        ///  商户号id
        /// </summary>
        public string tlmchid { get; set; }

        /// <summary>
        ///  操作人名称
        /// </summary>
        public string tlczrmc { get; set; }

        /// <summary>
        ///  充值金额
        /// </summary>
        public decimal tlglywje { get; set; }

        /// <summary>
        ///  微信支付订单号
        /// </summary>
        public string tljylsh { get; set; }

        /// <summary>
        ///  用户标识 openid
        /// </summary>
        public string tlyhbj { get; set; }

        /// <summary>
        ///  是否关注公众账号0-否1-是
        /// </summary>
        public short tlgzzhbj { get; set; }

        /// <summary>
        ///  付款银行
        /// </summary>
        public string tlfkyh { get; set; }

        /// <summary>
        ///  有效标记（目前也表示业务是否成立）
        /// </summary>
        public short tlsjyxbj { get; set; }

        /// <summary>
        ///  支付状态标记。0-未知 1-成功 2-失败
        /// </summary>
        public short tlsjzfbj { get; set; }

        /// <summary>
        ///  支付状态说明(针对失败/未知的错误说明)
        /// </summary>
        public string tlsjzfsm { get; set; }

        /// <summary>
        ///  支付过程中发生的返回字符串
        /// </summary>
        public string tlsjcxzffhwj { get; set; }

        /// <summary>
        ///  业务制单日
        /// </summary>
        public DateTime? tlglywyyr { get; set; }

        /// <summary>
        ///  业务界面名称。显示字段。
        /// </summary>
        public string tlglywjmmc { get; set; }

        /// <summary>
        ///  业务摘要信息。(充值说明)（CRM操作记录流水号（服务生成）|微信凭证号|本地业务生效时间|充现金|充增值|窗口名称="手机微信充值"|业务摘要|核算机构id|核算机构名称）
        /// </summary>
        public string tlglywxx { get; set; }

        ///// <summary>
        /////  12位带前缀'CZ'的微信转账操作流水号+客户注册编码[cousercode 3位]+随机附加值LEFT（(通过newid()去除"-"生成)，17）[20位]
        ///// </summary>
        //public string tllshfjz { get; set; }


    }

    public class WxlogMapper : ClassMapper<Wxlog>
    {
        public WxlogMapper()
        {
            Table("#wxlog");
            Map(f => f.tllsh).Column("tllsh");
            Map(f => f.tlfjz).Column("tlfjz");
            Map(f => f.tlsj).Column("tlsj");
            Map(f => f.tlddid).Column("tlddid");
            Map(f => f.tlqyh).Column("tlqyh");
            Map(f => f.tlmchid).Column("tlmchid");
            Map(f => f.tlczrmc).Column("tlczrmc");
            Map(f => f.tlglywje).Column("tlglywje");
            Map(f => f.tljylsh).Column("tljylsh");
            Map(f => f.tlyhbj).Column("tlyhbj");
            Map(f => f.tlgzzhbj).Column("tlgzzhbj");
            Map(f => f.tlfkyh).Column("tlfkyh");
            Map(f => f.tlsjyxbj).Column("tlsjyxbj");
            Map(f => f.tlsjzfbj).Column("tlsjzfbj");
            Map(f => f.tlsjzfsm).Column("tlsjzfsm");
            Map(f => f.tlsjcxzffhwj).Column("tlsjcxzffhwj");
            Map(f => f.tlglywyyr).Column("tlglywyyr");
            Map(f => f.tlglywjmmc).Column("tlglywjmmc");
            Map(f => f.tlglywxx).Column("tlglywxx");
            //Map(f => f.tllshfjz).Column("tllshfjz");
        }
    }
}
